/*  防抖指令 `v-debounce ` */
export default {
	inserted(el, binding) {
		el.addEventListener(binding.arg || "click", () => {
			if (!el.disabled) {
				el.disabled = true;
				el.classList.add("is-disabled");
				setTimeout(() => {
					el.disabled = false;
					el.classList.remove("is-disabled");
				}, binding.value || 1000); // 可以传入参数value
			}
		});
	},
};
